package Chapter4;

public class Student {
    //实体类不能包含main方法
    //访问修饰符 数据类型 变量名
    private String name;
    private int age;
    private boolean gender;

    public Student() {
    }
    public static void eat(){

    }
    //有参构造方法
    public Student(String name, int age, boolean gender) {
        //this.name 隐式参数 实例字段
        //this 代表当前实例
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public boolean isGender() {
        return gender;
    }

    public void setGender(boolean gender) {
        this.gender = gender;
    }
}
